-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: remove undefined ViewPropTypes references #836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
If somebody is willing to provide a better solution, flow types should be used instead |
|
Hello, why not? containerStyle: ViewPropTypes ? ViewPropTypes.style : null, |
React expects propTypes to be functions: Using null instead of a null-returning function would raise warnings in development mode |
rabidkitten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was having the same issue as described when running a React Native app on the web. It was working fine on my phone (iOS), but not in a web browser. As a comment, I tried the changes outlined herein and was able to use the component on the web as well as on the phone. It appears that these changes fix the issue.
|
Hoping this PR can be merged soon. The workarounds posted elsewhere on Github using custom postinstall scripts to insert ViewPropTypes back into the package hurts my eyes. I know web isn't officially supported but it would be great nonetheless. |
|
Merging this would be very much appreciated. I'd like to avoid any of the post install hacks. being able to run the same codebase on every mobile platform and also the web is incredibly useful, especially in the development stage. |
|
I was having the same issue as described when running a React Native app on the web. With the changes the slider loads OK; but sliding (in de web variant) only works with the keyboard; not with the mouse. Am I doing something wrong? |
@acidjunk Unfortunately this library doesn't explicitly support web browsers; the behavior you describe is actually the expected behavior. You will only be able to slide the carrousel in web browsers when using tactile screens or when using the browser device emulator. P.D. This PR is not adding web browser compatibility to the library but just fixing a null pointer error that causes a critical crash in web browsers |
|
Hello, I started getting this error in Expo SDK version 51. When will this PR be merged? |
The PR has been open for 3 years now. I'd say this repository is not maintained unfortunately. |
thanks for answer . By the way, this PR has also been improved. PR has been waiting for 2 weeks. #1015 |

Platforms affected
Google Chrome on Windows
What does this PR do?
Fix propTypes issues on browsers
What testing has been done on this change?
Launched the app in the Expo Client